namespace GroupSix.Domain.Services;

/// <summary>
/// 密码哈希领域服务接口
/// </summary>
public interface IPasswordHasher
{
    /// <summary>
    /// 哈希密码
    /// </summary>
    /// <param name="password">原始密码</param>
    /// <param name="salt">盐值</param>
    /// <returns>哈希后的密码</returns>
    string HashPassword(string password, string salt);
    
    /// <summary>
    /// 生成盐值
    /// </summary>
    /// <returns>盐值</returns>
    string GenerateSalt();
    
    /// <summary>
    /// 验证密码
    /// </summary>
    /// <param name="password">原始密码</param>
    /// <param name="salt">盐值</param>
    /// <param name="hash">哈希值</param>
    /// <returns>是否匹配</returns>
    bool VerifyPassword(string password, string salt, string hash);
} 